<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <!-- <button>click me</button>   -->
  <Form method="post" action="http://localhost:3001/api/save-data">
    type: <input type="text" name="type">
    money: <input type="text" name="money">
    date: <input type="date" name="date">
    useFor: <input type="text" name="useFor">

    <button type="submit">提交</button>
  </Form>
  <!-- <script>
   document.querySelector('button').addEventListener('click',function(){
    fetch('http://localhost:3000/api/save-data',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({name:'张三',age:23})}).then(
      res=>res.json()
    ).then(data=>console.log(data))
   })
  </script> -->
</body>
</html>